.class public Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;
.super Landroid/widget/FrameLayout;
.source "FloatingActionMenuContainer.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# instance fields
.field private mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 2
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 18
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 19
    invoke-direct {p0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->init()V

    .line 20
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    .line 23
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 24
    invoke-direct {p0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->init()V

    .line 25
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;
    .param p3, "defStyle"    # I

    .prologue
    .line 28
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 29
    invoke-direct {p0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->init()V

    .line 30
    return-void
.end method

.method private init()V
    .registers 1

    .prologue
    .line 33
    invoke-virtual {p0, p0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 34
    return-void
.end method


# virtual methods
.method public isMenuOpen()Z
    .registers 2

    .prologue
    .line 51
    iget-object v0, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    if-eqz v0, :cond_b

    .line 52
    iget-object v0, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->isOpen()Z

    move-result v0

    .line 55
    :goto_a
    return v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .registers 10
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 60
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    if-nez v1, :cond_8

    .line 61
    const/4 v1, 0x0

    .line 98
    :goto_7
    return v1

    .line 64
    :cond_8
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->isOpen()Z

    move-result v1

    if-eqz v1, :cond_98

    .line 65
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    float-to-int v2, v2

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v3

    float-to-int v3, v3

    invoke-virtual {v1, v2, v3}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->getHitItem(II)Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;

    move-result-object v0

    .line 67
    .local v0, "item":Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;
    if-eqz v0, :cond_a0

    .line 71
    iget-object v1, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->animator:Landroid/animation/Animator;

    if-nez v1, :cond_3b

    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->isAnimating()Z

    move-result v1

    if-nez v1, :cond_3b

    .line 73
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    const v2, 0x3fa66666

    invoke-virtual {v1, v0, v2}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->scaleItemView(Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;F)V

    .line 78
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1, v0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->resetItem(Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;)V

    .line 85
    :cond_3b
    :goto_3b
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    if-eq v1, v5, :cond_4f

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    const/4 v2, 0x3

    if-eq v1, v2, :cond_4f

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    const/4 v2, 0x4

    if-ne v1, v2, :cond_98

    .line 86
    :cond_4f
    if-eqz v0, :cond_8e

    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->isAnimating()Z

    move-result v1

    if-nez v1, :cond_8e

    .line 87
    const-string v1, ""

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "hit:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->x:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "x"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->y:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 88
    iget-object v1, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->onClickListener:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$OnActionMenuClickListener;

    if-eqz v1, :cond_8e

    .line 89
    iget-object v1, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->onClickListener:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$OnActionMenuClickListener;

    iget-object v2, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->view:Landroid/view/View;

    iget v3, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->x:I

    iget v4, v0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;->y:I

    invoke-interface {v1, v2, v3, v4}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$OnActionMenuClickListener;->onClick(Landroid/view/View;II)V

    .line 93
    :cond_8e
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1, v6}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->resetItem(Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;)V

    .line 94
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1, v5, v0}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->close(ZLcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;)V

    .line 98
    .end local v0    # "item":Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;
    :cond_98
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->isOpen()Z

    move-result v1

    goto/16 :goto_7

    .line 82
    .restart local v0    # "item":Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;
    :cond_a0
    iget-object v1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v1, v6}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->resetItem(Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu$Item;)V

    goto :goto_3b
.end method

.method public openMenu()V
    .registers 3

    .prologue
    .line 45
    iget-object v0, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    if-eqz v0, :cond_a

    .line 46
    iget-object v0, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->open(Z)V

    .line 48
    :cond_a
    return-void
.end method

.method public setFloatingActionMenu(Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;)V
    .registers 2
    .param p1, "actionMenu"    # Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    .prologue
    .line 37
    iput-object p1, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    .line 38
    return-void
.end method

.method public setMenuCenter(II)V
    .registers 4
    .param p1, "x"    # I
    .param p2, "y"    # I

    .prologue
    .line 41
    iget-object v0, p0, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenuContainer;->mFloatingActionMenu:Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;

    invoke-virtual {v0, p1, p2}, Lcom/zuimeia/ui/floatingactionmenu/FloatingActionMenu;->setCenter(II)V

    .line 42
    return-void
.end method
